﻿using System;
using System.Collections.Generic;
using System.Dto;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace System.IBLL
{
    public interface IRepairManager
    {
        /// <summary>
        /// 获取到住户报修表的数据总计，总维修数，总报修数以及当日的数据
        /// </summary>
        /// <returns></returns>
        GetGuaranteeListViewDto GetGuaranteeListData();
        /// <summary>
        /// 获取到住户报修表的数据并返回给table
        /// </summary>
        /// <param name="limit">条数</param>
        /// <param name="page">页数</param>
        /// <param name="datalet">总条数</param>
        /// <param name="RepairTitle">报修名称筛选</param>
        /// <param name="RepairContent">报修内容筛选</param>
        /// <param name="UserName">报修人筛选</param>
        /// <returns></returns>
        List<GetUserGuaranteeListDto> GetUserGuaranteeLists(int limit, int page, out int datalet, string RepairTitle, string RepairContent, string UserName=null);
        List<GetUserGuaranteeListDto> GetMyUserGuaranteeLists(string userName, int limit, int page, out int datalet, string RepairTitle, string RepairContent);
        /// <summary>
        /// 通过ID确定具体报修已完成
        /// </summary>
        /// <param name="id">报修数据ID</param>
        /// <returns></returns>
        Task SuccessOneDataById(int id,bool repairState, string repairContent="");

        Task IsAcceptanceById(int id, bool repairResult, string repairContent);

        /// <summary>
        /// 获取到住户表的所有住户名
        /// </summary>
        /// <param name="limit">条数</param>
        /// <param name="page">页数</param>
        /// <param name="HouseholdName">住户名筛选</param>
        /// <param name="datalet">总条数</param>
        /// <returns></returns>
        List<(int Id, string UserName)> GetHouseholdNameLists(int limit, int page, string HouseholdName, out int datalet);
        /// <summary>
        /// 添加一条报修信息
        /// </summary>
        /// <param name="listDto">数据模型</param>
        /// <returns></returns>
        Task AddOneUserGuarantee(GetUserGuaranteeListDto listDto);

        Task WriteEvaluateById(int id, string Evaluate);
    }
}
